package com.example.yichuangyun.mvvm.di;

import android.app.Activity;

import androidx.fragment.app.Fragment;

import com.example.yichuangyun.mvvm.di.scope.FragmentScope;

import dagger.Module;
import dagger.Provides;

@Module
public class FragmentModule {
    private final Fragment mFragment;

    public FragmentModule(Fragment mFragment) {
        this.mFragment = mFragment;
    }

    @FragmentScope
    @Provides
    public Activity provideActivity(){
        return mFragment.getActivity();
    }
}
